Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support CityScapesDetection Metric #103

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

BIGWangYuDong
Copy link
Collaborator

No description provided.

@BIGWangYuDong BIGWangYuDong requested a review from zhouzaida as a code owner March 1, 2023 11:22
@BIGWangYuDong BIGWangYuDong requested review from RangiLyu and removed request for zhouzaida March 1, 2023 11:23
mmeval/metrics/cityscapes_detection.py Outdated Show resolved Hide resolved
Comment on lines +65 to +68
>>> dataset_metas = {
... 'classes': ('person', 'rider', 'car', 'truck', 'bus', 'train',
... 'motorcycle', 'bicycle')
... }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If dataset_meta is required in this Metric, it must be explained in the docstring

mmeval/metrics/cityscapes_detection.py Outdated Show resolved Hide resolved
mmeval/metrics/cityscapes_detection.py Show resolved Hide resolved
mmeval/metrics/cityscapes_detection.py Outdated Show resolved Hide resolved
mmeval/metrics/cityscapes_detection.py Outdated Show resolved Hide resolved
mmeval/metrics/cityscapes_detection.py Outdated Show resolved Hide resolved
mmeval/metrics/cityscapes_detection.py Outdated Show resolved Hide resolved
mmeval/metrics/cityscapes_detection.py Outdated Show resolved Hide resolved
Comment on lines 134 to 146
cityscapes_det_metric = CityScapesDetection(
dataset_meta=dataset_metas,
format_only=True,
outfile_prefix=osp.join(tmp_dir.name, 'test'),
seg_prefix=seg_prefix,
keep_results=True,
keep_gt_json=True,
classwise=True)

eval_results = cityscapes_det_metric(
predictions=predictions, groundtruths=groundtruths)
assert osp.exists(f'{osp.join(tmp_dir.name, "test")}')
assert eval_results == dict()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add a test case: call metric.add >= 2 times and then metric.compute

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already compute 2 times. len(predictions) == len(groundtruths) == 2

@BIGWangYuDong BIGWangYuDong requested a review from C1rN09 March 7, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants